extends ./layout

append css

block contentAll
  .container
    ol.breadcrumb(style='margin:1em 0 1em;')
      span.glyphicon.glyphicon-home.myglyphicon
      |&nbsp;您当前的位置:&nbsp;
      li
        a(href="/") 首页
      li
        | 分类文章
      li.active=category


block contentLeft
  .articleContent
    .contentList
      .ul.list-unstyled
        .page-header
          h2=category
            | 分类所有文章
        each article in articles
          li
            a(href='../view/' + article.slug, target='_blank')
              h4
                =article.title
            p.contentlimit
              =truncate(article.content, 150)
            .articleinfo
              span.articleinfo-left
                span.article-userinfo
                  img.img-circle.img-responsive(src='/img/userimages/' + article.author.avatar )
                  | &nbsp;&nbsp;
                  =article.author.username
                  | &nbsp;&nbsp
                span.article-created
                  i.fa.fa-clock-o &nbsp&nbsp;
                  =moment(article.created).format('YYYY-MM-DD HH:mm:ss')
              span.articleinfo-right
                span.article-category
                  i.fa.fa-file-code-o &nbsp;
                  a(href="../category/"+article.category.name, target='_blank')
                    =article.category.name
                  | &nbsp;&nbsp;&nbsp
                span.article-comments
                  i.fa.fa-comments-o &nbsp;&nbsp;
                  =article.comments.length || 0
                  | &nbsp;&nbsp
                span.article-meta
                  i.fa.fa-thumbs-up &nbsp;&nbsp;
                  =article.meta.favorites || 0
                  | &nbsp;&nbsp
                span.showdatial
                  a(href='../view/' + article.slug, target='_blank') 查看全文
            .nofloat
      //-.box(style='height:1000px;')
      .paging(style='')
        nav(aria-label='Page navigation', style='text-align: center;margin:0 auto;"')
          ul.pagination
            li
              span
                |文章总数：
                =dataTotal
            li
              a(href='#', aria-label='Previous')
                span(aria-hidden='true') « 上一页
            -var pagect = 1
            -var path
            while pagect <= pageCount
              -path = '../category/'+category+'?page=' + pagect
              if(pageNum == pagect)
                li.active
                  a(href=path)= pagect++
              else
                li
                  a(href=path)= pagect++
            li
              a(href='#', aria-label='Next')
                span(aria-hidden='true') 下一页 »
            li
              span
                |总页数：
                =pageCount


block contentRight
  .row
    .panel.panel-default(style='border:0; box-shadow:3px 3px 15px -10px rgba(0, 0, 0, 0.9);')
      .panel-body(style='padding-top:0;')
        h3.panel-title(style='border-bottom:1px solid rgba(0, 0, 0, 0.05);padding:8px 0;margin:0 0 5px;')
          span.glyphicon.glyphicon-triangle-right.myglyphicon(aria-hidden="true", )
          | 文章分类
        .ulcontent
          .ul.list-unstyled
            each category in categories
              li
                a(href="../category/"+category.name)
                  =category.name

    .panel.panel-default(style='border:0; box-shadow:3px 3px 15px -10px rgba(0, 0, 0, 0.9);')
      .panel-body(style='padding-top:0;')
        h3.panel-title(style='border-bottom:1px solid rgba(0, 0, 0, 0.05);padding:8px 0;margin:0 0 5px;')
          span.glyphicon.glyphicon-triangle-right.myglyphicon(aria-hidden="true", )
          | 友情链接
        .ulcontent
          .ul.list-unstyled
            li
              a(href="#") Item 1
            li
              a(href="#") Item 2
            li
              a(href="#") Item 3
            li
              a(href="#") Item 4







